import Vue from "vue";
import Vuex from "vuex";
import app from "./modules/app";
import permission from "./modules/permission";
import tagsView from "./modules/tags-view";
import user from "./modules/user";
import constant from "./modules/constant";
import getters from "./getters";

Vue.use(Vuex);

const state = {
  name: '张茹月',
  age: 27,
  sex: 'women'
}

const mutations = {
  changeNameToZhangsan(state) {
    state.name = '李四'
  }
}
const actions = {}

const store = new Vuex.Store({
  state,
  mutations,
  actions,
  modules: {
    app,
    permission,
    tagsView,
    user,
    constant
  },
  getters
});

export default store;
